package com.kmzx.one.project.mapper;

import com.github.pagehelper.Page;
import com.kmzx.one.project.entity.UserCashDetail;
import com.kmzx.one.project.entity.UserCashFees;
import com.kmzx.one.project.others.dto.UserProfitDetailInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Component
@Mapper
public interface UserCashMapper {

    void insertUserCashDetail(UserCashDetail userCashDetail);

    UserCashDetail selectKey(@Param("id") String id);

    void updateByIdSelect(UserCashDetail userCashDetail);

    BigDecimal selectMyWithdrawMonth(@Param("userId") String userId, @Param("start") Date start, @Param("end") Date end);

    BigDecimal selectMyWithdrawFeeMonth(@Param("userId") String userId, @Param("start") Date start, @Param("end") Date end);

    List<UserCashFees> selectAllUserCashFees();

    List<UserCashDetail> selectAllCashDetail(String userId);

    Page<UserProfitDetailInfo> selectUserOutcomeDetails(@Param("userId") String userId, @Param("kinds") int kinds);

    Page<UserProfitDetailInfo> selectUserProfitDetails(@Param("userId") String userId, @Param("kinds") int kinds);

    int selectHasSuccessCash(@Param("userId") String userId, @Param("start") Date start, @Param("end") Date end);
}
